package com.example.dubbo.storage.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.dubbo.service.StorageService;
import com.example.dubbo.storage.entity.Storage;
import com.example.dubbo.storage.mapper.StorageMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

/**
 * @author zxs
 * @since 2021/5/31
 */
@DubboService
@Service
public class StorageServiceImpl extends ServiceImpl<StorageMapper, Storage> implements StorageService {

    @Override
    public void purseStorage(){
        Storage storage =new Storage();
        storage.setName("库存");
        this.save(storage);
        System.out.println("减库存成功");
        throw new RuntimeException();
    }
}
